#ifndef DEFINES_H
#define DEFINES_H
#include <stdint.h>

enum Type {
    T_NOTHING,
    T_CELL,
    T_FOOD,
    T_WALL,
    T_MINWALL,
    T_PORTAL,
};

enum Genome {
   G_SUN_ENERGY,
   G_COLLECT_MINERALS,
   G_MINERALS_ENERGY,
   G_MOVE,
   G_ROTATE,
   G_RUP,
   G_UP,
   G_LUP,
   G_LEFT,
   G_LDOWN,
   G_DOWN,
   G_RDOWN,
   G_RIGHT,
   G_CHECK_CELL,
   G_CHECK_WALL,
   G_CHECK_MINWALL,
   G_CHECK_FOOD,
   G_MAKE_CELL,
   G_KILL_CELL,
   G_EAT_FOOD,
   G_JUMP_GENOME,
   G_CHECK_GENOME,
   G_SHARE_ENERGY,
   G_BUILD_WALL,
   G_BREAK_WALL,
   G_INFECT,
   G_CHECK_RED,
   G_CHECK_GREEN,
   G_CHECK_BLUE,
   G_USE_MINERALS,
   G_DONT_USE_MINERALS,
   /* Unused commands */
   G_END,
};

/*      LUP    UP    RUP
 *
 *      LEFT         RIGHT
 *
 *      LDOWN  DOWN  RDOWN
 */
enum Direction {
    D_RUP,
    D_UP,
    D_LUP,
    D_LEFT,
    D_LDOWN,
    D_DOWN,
    D_RDOWN,
    D_RIGHT,
};

enum ColorMode {
    C_CELL_COLOR,
    C_FOOD_TYPE,
    C_ENERGY,
    C_AGE,
    C_END,
};

enum pkgType {
    P_AUTH,
    P_SEND,
    P_CLOSE,
};

struct Color {
    uint8_t r, g, b;
};

#define MAX_PKG_COUNT 258

#ifdef __EMSCRIPTEN__
#define stderr stdout
#endif

#endif
